import React, { Component, PropTypes } from 'react';
import { connect } from 'dva';
import { hashHistory } from 'dva/router';
import styles from '../../routes/IndexPage.css';
import { Icon, Table, Progress } from 'antd';
var _state,_props,_this;



class usedModal extends Component {
  constructor(props) {
    super(props);
    this.state = {
      current: [],
    }
  }
  render() {
    _this = this;
    _props = _this.props;
    _state = _this.state;
   // console.log(_props)

    const columns = [
      {title: '机房',dataIndex: 'name_',width: 80,},
      {title: '总U位',dataIndex: 'Utotal',width: 40,},
      {title: '已使用',dataIndex: 'per',width: 160,render: function(text, record, index){
        return (<Progress percent={text} strokeWidth={5} />)
      }},
     
    ];
    // const data = [
    //   {key: '1',name: '机房1',age: 3500,user: 0,},
    //   {key: '2',name: '机房2',age: 3500,user: 45,},
    //   {key: '3',name: '机房3',age: 3500,user: 85,},
    //   {key: '4',name: '机房4',age: 3500,user: 65,},
    //   {key: '5',name: '机房5',age: 3500,user: 55,},
    // ];

    return (
      <div className={styles.userModal}>
        <div className={styles.usertit} style={{fontSize: 14,color: "#666",fontWeight: 700}}>
          机房U位使用情况
        </div>
        <div className={styles.usercont}>
          <Table style={{width: "100%",height: "100%"}} className="userModalTable"
            columns={columns}
            rowKey={record => record.name_}
            dataSource={_props.uData}
            pagination={false}
            scroll={{ y: 200 }}
          />
        </div>
      </div>
    );
  }
}

module.exports = usedModal
